// 写入
const fs = require('fs')



for (let i = 0; i < 5; i++) {
    fs.writeFile('./hello.js' + i, '新添加的内容' + i, function (error) {
        console.log(error)
    })
}

// 读取
fs.readFile('./hello', function (error, data) {
    if (error) {
        console.log(error)
    } else {
        console.log(data.toString())
    }
})